3.8.68 \(\int \frac {\sqrt {a+b \sin (e+f x)}}{\sqrt {c+d \sin (e+f x)}} \, dx\) [768]

Optimal. Leaf size=198 \[ \frac {2 \sqrt {c+d} \Pi \left (\frac {b (c+d)}{(a+b) d};\sin ^{-1}\left (\frac {\sqrt {a+b} \sqrt {c+d \sin (e+f x)}}{\sqrt {c+d} \sqrt {a+b \sin (e+f x)}}\right )|\frac {(a-b) (c+d)}{(a+b) (c-d)}\right ) \sec (e+f x) \sqrt {-\frac {(b c-a d) (1-\sin (e+f x))}{(c+d) (a+b \sin (e+f x))}} \sqrt {\frac {(b c-a d) (1+\sin (e+f x))}{(c-d) (a+b \sin (e+f x))}} (a+b \sin (e+f x))}{\sqrt {a+b} d f} \]

[Out]

2*EllipticPi((a+b)^(1/2)*(c+d*sin(f*x+e))^(1/2)/(c+d)^(1/2)/(a+b*sin(f*x+e))^(1/2),b*(c+d)/(a+b)/d,((a-b)*(c+d
)/(a+b)/(c-d))^(1/2))*sec(f*x+e)*(a+b*sin(f*x+e))*(c+d)^(1/2)*(-(-a*d+b*c)*(1-sin(f*x+e))/(c+d)/(a+b*sin(f*x+e
)))^(1/2)*((-a*d+b*c)*(1+sin(f*x+e))/(c-d)/(a+b*sin(f*x+e)))^(1/2)/d/f/(a+b)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 198, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.034, Rules used = {2890} \begin {gather*} \frac {2 \sqrt {c+d} \sec (e+f x) (a+b \sin (e+f x)) \sqrt {-\frac {(b c-a d) (1-\sin (e+f x))}{(c+d) (a+b \sin (e+f x))}} \sqrt {\frac {(b c-a d) (\sin (e+f x)+1)}{(c-d) (a+b \sin (e+f x))}} \Pi \left (\frac {b (c+d)}{(a+b) d};\text {ArcSin}\left (\frac {\sqrt {a+b} \sqrt {c+d \sin (e+f x)}}{\sqrt {c+d} \sqrt {a+b \sin (e+f x)}}\right )|\frac {(a-b) (c+d)}{(a+b) (c-d)}\right )}{d f \sqrt {a+b}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + b*Sin[e + f*x]]/Sqrt[c + d*Sin[e + f*x]],x]

[Out]

(2*Sqrt[c + d]*EllipticPi[(b*(c + d))/((a + b)*d), ArcSin[(Sqrt[a + b]*Sqrt[c + d*Sin[e + f*x]])/(Sqrt[c + d]*
Sqrt[a + b*Sin[e + f*x]])], ((a - b)*(c + d))/((a + b)*(c - d))]*Sec[e + f*x]*Sqrt[-(((b*c - a*d)*(1 - Sin[e +
 f*x]))/((c + d)*(a + b*Sin[e + f*x])))]*Sqrt[((b*c - a*d)*(1 + Sin[e + f*x]))/((c - d)*(a + b*Sin[e + f*x]))]
*(a + b*Sin[e + f*x]))/(Sqrt[a + b]*d*f)

Rule 2890

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Simp[
2*((a + b*Sin[e + f*x])/(d*f*Rt[(a + b)/(c + d), 2]*Cos[e + f*x]))*Sqrt[(b*c - a*d)*((1 + Sin[e + f*x])/((c -
d)*(a + b*Sin[e + f*x])))]*Sqrt[(-(b*c - a*d))*((1 - Sin[e + f*x])/((c + d)*(a + b*Sin[e + f*x])))]*EllipticPi
[b*((c + d)/(d*(a + b))), ArcSin[Rt[(a + b)/(c + d), 2]*(Sqrt[c + d*Sin[e + f*x]]/Sqrt[a + b*Sin[e + f*x]])],
(a - b)*((c + d)/((a + b)*(c - d)))], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2
, 0] && NeQ[c^2 - d^2, 0] && PosQ[(a + b)/(c + d)]

Rubi steps

\begin {align*} \int \frac {\sqrt {a+b \sin (e+f x)}}{\sqrt {c+d \sin (e+f x)}} \, dx &=\frac {2 \sqrt {c+d} \Pi \left (\frac {b (c+d)}{(a+b) d};\sin ^{-1}\left (\frac {\sqrt {a+b} \sqrt {c+d \sin (e+f x)}}{\sqrt {c+d} \sqrt {a+b \sin (e+f x)}}\right )|\frac {(a-b) (c+d)}{(a+b) (c-d)}\right ) \sec (e+f x) \sqrt {-\frac {(b c-a d) (1-\sin (e+f x))}{(c+d) (a+b \sin (e+f x))}} \sqrt {\frac {(b c-a d) (1+\sin (e+f x))}{(c-d) (a+b \sin (e+f x))}} (a+b \sin (e+f x))}{\sqrt {a+b} d f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.15, size = 197, normalized size = 0.99 \begin {gather*} \frac {2 \sqrt {c+d} \Pi \left (\frac {b (c+d)}{(a+b) d};\sin ^{-1}\left (\frac {\sqrt {a+b} \sqrt {c+d \sin (e+f x)}}{\sqrt {c+d} \sqrt {a+b \sin (e+f x)}}\right )|\frac {(a-b) (c+d)}{(a+b) (c-d)}\right ) \sec (e+f x) \sqrt {\frac {(-b c+a d) (1-\sin (e+f x))}{(c+d) (a+b \sin (e+f x))}} \sqrt {\frac {(b c-a d) (1+\sin (e+f x))}{(c-d) (a+b \sin (e+f x))}} (a+b \sin (e+f x))}{\sqrt {a+b} d f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + b*Sin[e + f*x]]/Sqrt[c + d*Sin[e + f*x]],x]

[Out]

(2*Sqrt[c + d]*EllipticPi[(b*(c + d))/((a + b)*d), ArcSin[(Sqrt[a + b]*Sqrt[c + d*Sin[e + f*x]])/(Sqrt[c + d]*
Sqrt[a + b*Sin[e + f*x]])], ((a - b)*(c + d))/((a + b)*(c - d))]*Sec[e + f*x]*Sqrt[((-(b*c) + a*d)*(1 - Sin[e
+ f*x]))/((c + d)*(a + b*Sin[e + f*x]))]*Sqrt[((b*c - a*d)*(1 + Sin[e + f*x]))/((c - d)*(a + b*Sin[e + f*x]))]
*(a + b*Sin[e + f*x]))/(Sqrt[a + b]*d*f)

________________________________________________________________________________________

Maple [C] Result contains complex when optimal does not.
time = 21.07, size = 248426, normalized size = 1254.68

method result size
default \(\text {Expression too large to display}\) \(248426\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sin(f*x+e))^(1/2)/(c+d*sin(f*x+e))^(1/2),x,method=_RETURNVERBOSE)

[Out]

result too large to display

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(f*x+e))^(1/2)/(c+d*sin(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(b*sin(f*x + e) + a)/sqrt(d*sin(f*x + e) + c), x)

________________________________________________________________________________________

Fricas [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(f*x+e))^(1/2)/(c+d*sin(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

Exception raised: TypeError >>  Error detected within library code:   Curve not irreducible after change of va
riable 0 -> infinity

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {a + b \sin {\left (e + f x \right )}}}{\sqrt {c + d \sin {\left (e + f x \right )}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(f*x+e))**(1/2)/(c+d*sin(f*x+e))**(1/2),x)

[Out]

Integral(sqrt(a + b*sin(e + f*x))/sqrt(c + d*sin(e + f*x)), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(f*x+e))^(1/2)/(c+d*sin(f*x+e))^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(b*sin(f*x + e) + a)/sqrt(d*sin(f*x + e) + c), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {a+b\,\sin \left (e+f\,x\right )}}{\sqrt {c+d\,\sin \left (e+f\,x\right )}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sin(e + f*x))^(1/2)/(c + d*sin(e + f*x))^(1/2),x)

[Out]

int((a + b*sin(e + f*x))^(1/2)/(c + d*sin(e + f*x))^(1/2), x)

________________________________________________________________________________________